#define D2D_INPUT_COUNT 1
#define D2D_INPUT0_COMPLEX

#include "d2d1effecthelpers.hlsli"

int offset = 5;

D2D_PS_ENTRY(main){

float4 left = D2DSampleInputAtOffset(0, float2(-offset, 0));
float4 right = D2DSampleInputAtOffset(0, float2(offset, 0));
float4 top = D2DSampleInputAtOffset(0, float2(0, -offset));
float4 button = D2DSampleInputAtOffset(0, float2(0, offset));

float r = (left.r + right.r + top.r + button.r) / 4;
float g = (left.g + right.g + top.g + button.g) / 4;
float b = (left.b + right.b + top.b + button.b) / 4;
float a = (left.a + right.a + top.a + button.a) / 4;

return float4(r,g,b,a);
}